﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Game : Class1
    {
        protected int npcNum;
        protected int useNum;
        protected string npcCheck;
        protected string useCheck;



        public override void npc()
        {
            Class1 class1 = new Class1();
            Random ran = new Random();
            npcNum = ran.Next(3) + 1;
            Type type = typeof(GuessGame);
            npcCheck = type.GetEnumName(npcNum);
            Console.WriteLine("{0}出拳：{1}", class1.npcname, npcCheck);
        }

        public override void use()
        {
            Class1 class1 = new Class1();
            Console.WriteLine(base.usename);
            Console.WriteLine("请出拳：1.石头 2.剪刀 3.布（输入相应数字）");
            useNum = Convert.ToInt32(Console.ReadLine());
            Type type = typeof(GuessGame);
            useCheck = type.GetEnumName(useNum);
            Console.WriteLine("{0}出拳：{1}", class1.usename, useCheck);
        }
    }
}
